<?php
namespace App\Models\Ly;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;

class wxLogin extends Model
{
    use HasFactory;
    protected $table='ly_wx_users';
    protected $guarded=[];
    public static function getOne($params)
    {
        return self::where(['openid'=>$params['openid']])->first();
    }
    public static function add($params)
    {
        return self::create($params);
    }

    public static function edit($params)
    {
        return self::update($params);
    }

    /*
     * 查找手机号
     * @name lak
     * */
    public static function GetPhone($result){
        return self::query()->where($result)->first();
    }

    /*
     * 注册手机号
     * @name lak
     * */
    public static function Creat($result){
        return self::query()->create($result);
    }


}
